!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("rb_wixui.thunderbolt[MediaPlayer_videoBoxResponsive]",["react"],t):"object"==typeof exports?exports["rb_wixui.thunderbolt[MediaPlayer_videoBoxResponsive]"]=t(require("react")):e["rb_wixui.thunderbolt[MediaPlayer_videoBoxResponsive]"]=t(e.React)}("undefined"!=typeof self?self:this,(function(e){return function(){var t={67740:function(e,t){"use strict";t.G6=t.w1=void 0;t.w1=e=>!!e&&!!e.document&&!!e.document.documentMode;t.G6=e=>{const t=n(e);return t.indexOf("safari")>-1&&t.indexOf("version")>-1};const n=e=>e&&e.navigator&&e.navigator.userAgent?e.navigator.userAgent.toLowerCase():""},5329:function(t){"use strict";t.exports=e},448:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t.keyCode===e&&(t.preventDefault(),t.stopPropagation(),t.currentTarget.click())}}u(32),u(s),u(c);const d=["aria-id","aria-metadata","aria-type"],l=function(e){let{role:t,tabIndex:n,tabindex:r,...a}=void 0===e?{}:e;const i=Object.entries(a).reduce(((e,t)=>{let[n,r]=t;return{...e,[("aria-"+n).toLowerCase()]:r}}),{role:t,tabIndex:null!=n?n:r});return Object.keys(i).forEach((e=>{void 0!==i[e]&&null!==i[e]||delete i[e]})),o=i,s=d,Object.entries(o).reduce(((e,t)=>{let[n,r]=t;return s.includes(n)||(e[n]=r),e}),{});var o,s};function h(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t{let{children:n,className:r}=e;return o().createElement("div",{className:m(r,p),"data-testid":f,ref:t},n)})),E=(e,t)=>{let{containerLayoutClassName:n,overlowWrapperClassName:r,hasOverflow:a,hasScrollOverflow:s,shouldOmitWrapperLayers:c,children:u,role:d,label:h,extraRootClass:f="",ariaLive:p,ariaAttributes:E,tabIndex:T,tagName:v="div"}=e;const I=!c&&a,b=I?s?T||0:-1:void 0,w=(0,i.useCallback)((e=>I?o().createElement(_,{className:m(r,f)},e):e),[I,r,f]),L=a?n:m(n,f),y={ref:t,"data-testid":g,tabIndex:b,...d?{role:d}:{},...h?{"aria-label":h}:{},...p?{"aria-live":p}:{},...l(E)};return"multi-column-layouter"===v?(y.class=L,y.style={visibility:"hidden"}):y.className=L,w(c?o().createElement(o().Fragment,null,u()):o().createElement(v||"div",y,u()))};var T=o().forwardRef(E);const v=()=>"undefined"!=typeof window;const I="wixui-",b=(e,...t)=>{const n=[];return e&&n.push(`${I}${e}`),t.forEach((e=>{e&&(n.push(`${I}${e}`),n.push(e))})),n.join(" ")};var w="HlRz5e";const L="v1",y=2,x=1920,A=1920,R=1e3,C=1e3,S={SCALE_TO_FILL:"fill",SCALE_TO_FIT:"fit",STRETCH:"stretch",ORIGINAL_SIZE:"original_size",TILE:"tile",TILE_HORIZONTAL:"tile_horizontal",TILE_VERTICAL:"tile_vertical",FIT_AND_TILE:"fit_and_tile",LEGACY_STRIP_TILE:"legacy_strip_tile",LEGACY_STRIP_TILE_HORIZONTAL:"legacy_strip_tile_horizontal",LEGACY_STRIP_TILE_VERTICAL:"legacy_strip_tile_vertical",LEGACY_STRIP_SCALE_TO_FILL:"legacy_strip_fill",LEGACY_STRIP_SCALE_TO_FIT:"legacy_strip_fit",LEGACY_STRIP_FIT_AND_TILE:"legacy_strip_fit_and_tile",LEGACY_STRIP_ORIGINAL_SIZE:"legacy_strip_original_size",LEGACY_ORIGINAL_SIZE:"actual_size",LEGACY_FIT_WIDTH:"fitWidth",LEGACY_FIT_HEIGHT:"fitHeight",LEGACY_FULL:"full",LEGACY_BG_FIT_AND_TILE:"legacy_tile",LEGACY_BG_FIT_AND_TILE_HORIZONTAL:"legacy_tile_horizontal",LEGACY_BG_FIT_AND_TILE_VERTICAL:"legacy_tile_vertical",LEGACY_BG_NORMAL:"legacy_normal"},M={FIT:"fit",FILL:"fill",FILL_FOCAL:"fill_focal",CROP:"crop",LEGACY_CROP:"legacy_crop",LEGACY_FILL:"legacy_fill"},O={CENTER:"center",TOP:"top",TOP_LEFT:"top_left",TOP_RIGHT:"top_right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom_left",BOTTOM_RIGHT:"bottom_right",LEFT:"left",RIGHT:"right"},P={[O.CENTER]:{x:.5,y:.5},[O.TOP_LEFT]:{x:0,y:0},[O.TOP_RIGHT]:{x:1,y:0},[O.TOP]:{x:.5,y:0},[O.BOTTOM_LEFT]:{x:0,y:1},[O.BOTTOM_RIGHT]:{x:1,y:1},[O.BOTTOM]:{x:.5,y:1},[O.RIGHT]:{x:1,y:.5},[O.LEFT]:{x:0,y:.5}},G={center:"c",top:"t",top_left:"tl",top_right:"tr",bottom:"b",bottom_left:"bl",bottom_right:"br",left:"l",right:"r"},N={BG:"bg",IMG:"img",SVG:"svg"},F={AUTO:"auto",CLASSIC:"classic",SUPER:"super"},k={classic:1,super:2},U={radius:"0.66",amount:"1.00",threshold:"0.01"},B={uri:"",css:{img:{},container:{}},attr:{img:{},container:{}},transformed:!1},H=25e6,D=[1.5,2,4],$={HIGH:{size:196e4,quality:90,maxUpscale:1},MEDIUM:{size:36e4,quality:85,maxUpscale:1},LOW:{size:16e4,quality:80,maxUpscale:1.2},TINY:{size:0,quality:80,maxUpscale:1.4}},Y={HIGH:"HIGH",MEDIUM:"MEDIUM",LOW:"LOW",TINY:"TINY"},V={CONTRAST:"contrast",BRIGHTNESS:"brightness",SATURATION:"saturation",HUE:"hue",BLUR:"blur"},j={JPG:"jpg",JPEG:"jpeg",JPE:"jpe",PNG:"png",WEBP:"webp",WIX_ICO_MP:"wix_ico_mp",WIX_MP:"wix_mp",GIF:"gif",SVG:"svg",AVIF:"avif",UNRECOGNIZED:"unrecognized"},z={AVIF:"AVIF",PAVIF:"PAVIF"};j.JPG,j.JPEG,j.JPE,j.PNG,j.GIF,j.WEBP;function W(e,...t){return function(...n){const r=n[n.length-1]||{},a=[e[0]];return t.forEach((function(t,i){const o=Number.isInteger(t)?n[t]:r[t];a.push(o,e[i+1])})),a.join("")}}function q(e){return e[e.length-1]}const Z=[j.PNG,j.JPEG,j.JPG,j.JPE,j.WIX_ICO_MP,j.WIX_MP,j.WEBP,j.AVIF],X=[j.JPEG,j.JPG,j.JPE];function K(e,t,n){return n&&t&&!(!(r=t.id)||!r.trim()||"none"===r.toLowerCase())&&Object.values(S).includes(e);var r}function J(e,t,n){return function(e,t,n=!1){return!((ee(e)||ne(e))&&t&&!n)}(e,t,n)&&(function(e){return Z.includes(se(e))}(e)||function(e,t=!1){return te(e)&&t}(e,n))&&!/(^https?)|(^data)|(^\/\/)/.test(e)}function Q(e){return se(e)===j.PNG}function ee(e){return se(e)===j.WEBP}function te(e){return se(e)===j.GIF}function ne(e){return se(e)===j.AVIF}const re=["/","\\","?","<",">","|","\u201c",":",'"'].map(encodeURIComponent),ae=["\\.","\\*"],ie="_";function oe(e){return function(e){return X.includes(se(e))}(e)?j.JPG:Q(e)?j.PNG:ee(e)?j.WEBP:te(e)?j.GIF:ne(e)?j.AVIF:j.UNRECOGNIZED}function se(e){return(/[.]([^.]+)$/.exec(e)&&/[.]([^.]+)$/.exec(e)[1]||"").toLowerCase()}function ce(e,t,n,r,a){let i;return i=a===M.FILL?function(e,t,n,r){return Math.max(n/e,r/t)}(e,t,n,r):a===M.FIT?function(e,t,n,r){return Math.min(n/e,r/t)}(e,t,n,r):1,i}function ue(e,t,n,r,a,i){e=e||r.width,t=t||r.height;const{scaleFactor:o,width:s,height:c}=function(e,t,n,r,a){let i,o=n,s=r;if(i=ce(e,t,n,r,a),a===M.FIT&&(o=e*i,s=t*i),o&&s&&o*s>H){const n=Math.sqrt(H/(o*s));o*=n,s*=n,i=ce(e,t,o,s,a)}return{scaleFactor:i,width:o,height:s}}(e,t,r.width*a,r.height*a,n);return function(e,t,n,r,a,i,o){const{optimizedScaleFactor:s,upscaleMethodValue:c,forceUSM:u}=function(e,t,n,r){if("auto"===r)return function(e,t){const n=me(e,t);return{optimizedScaleFactor:$[n].maxUpscale,upscaleMethodValue:k.classic,forceUSM:!1}}(e,t);if("super"===r)return function(e){return{optimizedScaleFactor:q(D),upscaleMethodValue:k.super,forceUSM:!(D.includes(e)||e>q(D))}}(n);return function(e,t){const n=me(e,t);return{optimizedScaleFactor:$[n].maxUpscale,upscaleMethodValue:k.classic,forceUSM:!1}}(e,t)}(e,t,i,a);let d=n,l=r;if(i<=s)return{width:d,height:l,scaleFactor:i,upscaleMethodValue:c,forceUSM:u,cssUpscaleNeeded:!1};switch(o){case M.FILL:d=n*(s/i),l=r*(s/i);break;case M.FIT:d=e*s,l=t*s}return{width:d,height:l,scaleFactor:s,upscaleMethodValue:c,forceUSM:u,cssUpscaleNeeded:!0}}(e,t,s,c,i,o,n)}function de(e,t,n,r){const a=he(n)||function(e=O.CENTER){return P[e]}(r);return{x:Math.max(0,Math.min(e.width-t.width,a.x*e.width-t.width/2)),y:Math.max(0,Math.min(e.height-t.height,a.y*e.height-t.height/2)),width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}}function le(e){return e.alignment&&G[e.alignment]||G[O.CENTER]}function he(e){let t;return!e||"number"!=typeof e.x||isNaN(e.x)||"number"!=typeof e.y||isNaN(e.y)||(t={x:fe(Math.max(0,Math.min(100,e.x))/100,2),y:fe(Math.max(0,Math.min(100,e.y))/100,2)}),t}function me(e,t){const n=e*t;return n>$[Y.HIGH].size?Y.HIGH:n>$[Y.MEDIUM].size?Y.MEDIUM:n>$[Y.LOW].size?Y.LOW:Y.TINY}function fe(e,t){const n=Math.pow(10,t||0);return(e*n/n).toFixed(t)}function ge(e){return e&&e.upscaleMethod&&F[e.upscaleMethod.toUpperCase()]||F.AUTO}function pe(e,t){const n=ee(e)||ne(e);return se(e)===j.GIF||n&&t}const _e={isMobile:!1},Ee=function(e){return _e[e]};function Te(){if("undefined"!=typeof window&&"undefined"!=typeof navigator){const t=window.matchMedia&&window.matchMedia("(max-width: 767px)").matches,n=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);e=t&&n,_e["isMobile"]=e}var e}function ve(e,t){const n={css:{container:{}}},{css:r}=n,{fittingType:a}=e;switch(a){case S.ORIGINAL_SIZE:case S.LEGACY_ORIGINAL_SIZE:case S.LEGACY_STRIP_ORIGINAL_SIZE:r.container.backgroundSize="auto",r.container.backgroundRepeat="no-repeat";break;case S.SCALE_TO_FIT:case S.LEGACY_STRIP_SCALE_TO_FIT:r.container.backgroundSize="contain",r.container.backgroundRepeat="no-repeat";break;case S.STRETCH:r.container.backgroundSize="100% 100%",r.container.backgroundRepeat="no-repeat";break;case S.SCALE_TO_FILL:case S.LEGACY_STRIP_SCALE_TO_FILL:r.container.backgroundSize="cover",r.container.backgroundRepeat="no-repeat";break;case S.TILE_HORIZONTAL:case S.LEGACY_STRIP_TILE_HORIZONTAL:r.container.backgroundSize="auto",r.container.backgroundRepeat="repeat-x";break;case S.TILE_VERTICAL:case S.LEGACY_STRIP_TILE_VERTICAL:r.container.backgroundSize="auto",r.container.backgroundRepeat="repeat-y";break;case S.TILE:case S.LEGACY_STRIP_TILE:r.container.backgroundSize="auto",r.container.backgroundRepeat="repeat";break;case S.LEGACY_STRIP_FIT_AND_TILE:r.container.backgroundSize="contain",r.container.backgroundRepeat="repeat";break;case S.FIT_AND_TILE:case S.LEGACY_BG_FIT_AND_TILE:r.container.backgroundSize="auto",r.container.backgroundRepeat="repeat";break;case S.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:r.container.backgroundSize="auto",r.container.backgroundRepeat="repeat-x";break;case S.LEGACY_BG_FIT_AND_TILE_VERTICAL:r.container.backgroundSize="auto",r.container.backgroundRepeat="repeat-y";break;case S.LEGACY_BG_NORMAL:r.container.backgroundSize="auto",r.container.backgroundRepeat="no-repeat"}switch(t.alignment){case O.CENTER:r.container.backgroundPosition="center center";break;case O.LEFT:r.container.backgroundPosition="left center";break;case O.RIGHT:r.container.backgroundPosition="right center";break;case O.TOP:r.container.backgroundPosition="center top";break;case O.BOTTOM:r.container.backgroundPosition="center bottom";break;case O.TOP_RIGHT:r.container.backgroundPosition="right top";break;case O.TOP_LEFT:r.container.backgroundPosition="left top";break;case O.BOTTOM_RIGHT:r.container.backgroundPosition="right bottom";break;case O.BOTTOM_LEFT:r.container.backgroundPosition="left bottom"}return n}const Ie={[O.CENTER]:"center",[O.TOP]:"top",[O.TOP_LEFT]:"top left",[O.TOP_RIGHT]:"top right",[O.BOTTOM]:"bottom",[O.BOTTOM_LEFT]:"bottom left",[O.BOTTOM_RIGHT]:"bottom right",[O.LEFT]:"left",[O.RIGHT]:"right"},be={position:"absolute",top:"auto",right:"auto",bottom:"auto",left:"auto"};function we(e,t){const n={css:{container:{},img:{}}},{css:r}=n,{fittingType:a}=e,i=t.alignment;switch(r.container.position="relative",a){case S.ORIGINAL_SIZE:case S.LEGACY_ORIGINAL_SIZE:e.parts&&e.parts.length?(r.img.width=e.parts[0].width,r.img.height=e.parts[0].height):(r.img.width=e.src.width,r.img.height=e.src.height);break;case S.SCALE_TO_FIT:case S.LEGACY_FIT_WIDTH:case S.LEGACY_FIT_HEIGHT:case S.LEGACY_FULL:r.img.width=t.width,r.img.height=t.height,r.img.objectFit="contain",r.img.objectPosition=Ie[i]||"unset";break;case S.LEGACY_BG_NORMAL:r.img.width="100%",r.img.height="100%",r.img.objectFit="none",r.img.objectPosition=Ie[i]||"unset";break;case S.STRETCH:r.img.width=t.width,r.img.height=t.height,r.img.objectFit="fill";break;case S.SCALE_TO_FILL:r.img.width=t.width,r.img.height=t.height,r.img.objectFit="cover"}if("number"==typeof r.img.width&&"number"==typeof r.img.height&&(r.img.width!==t.width||r.img.height!==t.height)){const e=Math.round((t.height-r.img.height)/2),n=Math.round((t.width-r.img.width)/2);Object.assign(r.img,be,function(e,t,n){return{[O.TOP_LEFT]:{top:0,left:0},[O.TOP_RIGHT]:{top:0,right:0},[O.TOP]:{top:0,left:t},[O.BOTTOM_LEFT]:{bottom:0,left:0},[O.BOTTOM_RIGHT]:{bottom:0,right:0},[O.BOTTOM]:{bottom:0,left:t},[O.RIGHT]:{top:e,right:0},[O.LEFT]:{top:e,left:0},[O.CENTER]:{width:n.width,height:n.height,objectFit:"none"}}}(e,n,t)[i])}return n}function Le(e,t){const n={css:{container:{}},attr:{container:{},img:{}}},{css:r,attr:a}=n,{fittingType:i}=e,o=t.alignment,{width:s,height:c}=e.src;let u;switch(r.container.position="relative",i){case S.ORIGINAL_SIZE:case S.LEGACY_ORIGINAL_SIZE:case S.TILE:e.parts&&e.parts.length?(a.img.width=e.parts[0].width,a.img.height=e.parts[0].height):(a.img.width=s,a.img.height=c),a.img.preserveAspectRatio="xMidYMid slice";break;case S.SCALE_TO_FIT:case S.LEGACY_FIT_WIDTH:case S.LEGACY_FIT_HEIGHT:case S.LEGACY_FULL:a.img.width="100%",a.img.height="100%",a.img.transform="",a.img.preserveAspectRatio="";break;case S.STRETCH:a.img.width=t.width,a.img.height=t.height,a.img.x=0,a.img.y=0,a.img.transform="",a.img.preserveAspectRatio="none";break;case S.SCALE_TO_FILL:J(e.src.id)?(a.img.width=t.width,a.img.height=t.height):(u=function(e,t,n,r,a){const i=ce(e,t,n,r,a);return{width:Math.round(e*i),height:Math.round(t*i)}}(s,c,t.width,t.height,M.FILL),a.img.width=u.width,a.img.height=u.height),a.img.x=0,a.img.y=0,a.img.transform="",a.img.preserveAspectRatio="xMidYMid slice"}if("number"==typeof a.img.width&&"number"==typeof a.img.height&&(a.img.width!==t.width||a.img.height!==t.height)){let e,n,r=0,s=0;i===S.TILE?(e=t.width%a.img.width,n=t.height%a.img.height):(e=t.width-a.img.width,n=t.height-a.img.height);const c=Math.round(e/2),u=Math.round(n/2);switch(o){case O.TOP_LEFT:r=0,s=0;break;case O.TOP:r=c,s=0;break;case O.TOP_RIGHT:r=e,s=0;break;case O.LEFT:r=0,s=u;break;case O.CENTER:r=c,s=u;break;case O.RIGHT:r=e,s=u;break;case O.BOTTOM_LEFT:r=0,s=n;break;case O.BOTTOM:r=c,s=n;break;case O.BOTTOM_RIGHT:r=e,s=n}a.img.x=r,a.img.y=s}return a.container.width=t.width,a.container.height=t.height,a.container.viewBox=[0,0,t.width,t.height].join(" "),n}function ye(e,t,n){let r;switch(t.crop&&(r=function(e,t){const n=Math.max(0,Math.min(e.width,t.x+t.width)-Math.max(0,t.x)),r=Math.max(0,Math.min(e.height,t.y+t.height)-Math.max(0,t.y));return n&&r&&(e.width!==n||e.height!==r)?{x:Math.max(0,t.x),y:Math.max(0,t.y),width:n,height:r}:null}(t,t.crop),r&&(e.src.width=r.width,e.src.height=r.height,e.src.isCropped=!0,e.parts.push(Ae(r)))),e.fittingType){case S.SCALE_TO_FIT:case S.LEGACY_FIT_WIDTH:case S.LEGACY_FIT_HEIGHT:case S.LEGACY_FULL:case S.FIT_AND_TILE:case S.LEGACY_BG_FIT_AND_TILE:case S.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:case S.LEGACY_BG_FIT_AND_TILE_VERTICAL:case S.LEGACY_BG_NORMAL:e.parts.push(xe(e,n));break;case S.SCALE_TO_FILL:e.parts.push(function(e,t){const n=ue(e.src.width,e.src.height,M.FILL,t,e.devicePixelRatio,e.upscaleMethod),r=he(e.focalPoint);return{transformType:r?M.FILL_FOCAL:M.FILL,width:Math.round(n.width),height:Math.round(n.height),alignment:le(t),focalPointX:r&&r.x,focalPointY:r&&r.y,upscale:n.scaleFactor>1,forceUSM:n.forceUSM,scaleFactor:n.scaleFactor,cssUpscaleNeeded:n.cssUpscaleNeeded,upscaleMethodValue:n.upscaleMethodValue}}(e,n));break;case S.STRETCH:e.parts.push(function(e,t){const n=ce(e.src.width,e.src.height,t.width,t.height,M.FILL),r={...t};return r.width=e.src.width*n,r.height=e.src.height*n,xe(e,r)}(e,n));break;case S.TILE_HORIZONTAL:case S.TILE_VERTICAL:case S.TILE:case S.LEGACY_ORIGINAL_SIZE:case S.ORIGINAL_SIZE:r=de(e.src,n,e.focalPoint,n.alignment),e.src.isCropped?(Object.assign(e.parts[0],r),e.src.width=r.width,e.src.height=r.height):e.parts.push(Ae(r));break;case S.LEGACY_STRIP_TILE_HORIZONTAL:case S.LEGACY_STRIP_TILE_VERTICAL:case S.LEGACY_STRIP_TILE:case S.LEGACY_STRIP_ORIGINAL_SIZE:e.parts.push(function(e){return{transformType:M.LEGACY_CROP,width:Math.round(e.width),height:Math.round(e.height),alignment:le(e),upscale:!1,forceUSM:!1,scaleFactor:1,cssUpscaleNeeded:!1}}(n));break;case S.LEGACY_STRIP_SCALE_TO_FIT:case S.LEGACY_STRIP_FIT_AND_TILE:e.parts.push(function(e){return{transformType:M.FIT,width:Math.round(e.width),height:Math.round(e.height),upscale:!1,forceUSM:!0,scaleFactor:1,cssUpscaleNeeded:!1}}(n));break;case S.LEGACY_STRIP_SCALE_TO_FILL:e.parts.push(function(e){return{transformType:M.LEGACY_FILL,width:Math.round(e.width),height:Math.round(e.height),alignment:le(e),upscale:!1,forceUSM:!0,scaleFactor:1,cssUpscaleNeeded:!1}}(n))}}function xe(e,t){const n=ue(e.src.width,e.src.height,M.FIT,t,e.devicePixelRatio,e.upscaleMethod);return{transformType:!e.src.width||!e.src.height?M.FIT:M.FILL,width:Math.round(n.width),height:Math.round(n.height),alignment:G.center,upscale:n.scaleFactor>1,forceUSM:n.forceUSM,scaleFactor:n.scaleFactor,cssUpscaleNeeded:n.cssUpscaleNeeded,upscaleMethodValue:n.upscaleMethodValue}}function Ae(e){return{transformType:M.CROP,x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height),upscale:!1,forceUSM:!1,scaleFactor:1,cssUpscaleNeeded:!1}}function Re(e,t){t=t||{},e.quality=function(e,t){const n=e.fileType===j.PNG,r=e.fileType===j.JPG,a=e.fileType===j.WEBP,i=e.fileType===j.AVIF,o=r||n||a||i;if(o){const r=q(e.parts),a=(s=r.width,c=r.height,$[me(s,c)].quality);let i=t.quality&&t.quality>=5&&t.quality<=90?t.quality:a;return i=n?i+5:i,i}var s,c;return 0}(e,t),e.progressive=function(e){return!1!==e.progressive}(t),e.watermark=function(e){return e.watermark}(t),e.autoEncode=t.autoEncode??!0,e.encoding=t?.encoding,e.unsharpMask=function(e,t){if(function(e){const t="number"==typeof(e=e||{}).radius&&!isNaN(e.radius)&&e.radius>=.1&&e.radius<=500,n="number"==typeof e.amount&&!isNaN(e.amount)&&e.amount>=0&&e.amount<=10,r="number"==typeof e.threshold&&!isNaN(e.threshold)&&e.threshold>=0&&e.threshold<=255;return t&&n&&r}(t.unsharpMask))return{radius:fe(t.unsharpMask?.radius,2),amount:fe(t.unsharpMask?.amount,2),threshold:fe(t.unsharpMask?.threshold,2)};if(("number"!=typeof(n=(n=t.unsharpMask)||{}).radius||isNaN(n.radius)||0!==n.radius||"number"!=typeof n.amount||isNaN(n.amount)||0!==n.amount||"number"!=typeof n.threshold||isNaN(n.threshold)||0!==n.threshold)&&function(e){const t=q(e.parts);return!(t.scaleFactor>=1)||t.forceUSM||t.transformType===M.FIT}(e))return U;var n;return}(e,t),e.filters=function(e){const t=e.filters||{},n={};Ce(t[V.CONTRAST],-100,100)&&(n[V.CONTRAST]=t[V.CONTRAST]);Ce(t[V.BRIGHTNESS],-100,100)&&(n[V.BRIGHTNESS]=t[V.BRIGHTNESS]);Ce(t[V.SATURATION],-100,100)&&(n[V.SATURATION]=t[V.SATURATION]);Ce(t[V.HUE],-180,180)&&(n[V.HUE]=t[V.HUE]);Ce(t[V.BLUR],0,100)&&(n[V.BLUR]=t[V.BLUR]);return n}(t)}function Ce(e,t,n){return"number"==typeof e&&!isNaN(e)&&0!==e&&e>=t&&e<=n}function Se(e,t,n,r){const a=function(e){return e?.isSEOBot??!1}(r),i=oe(t.id),o=function(e,t){const n=/\.([^.]*)$/,r=new RegExp(`(${re.concat(ae).join("|")})`,"g");if(t&&t.length){let e=t;const a=t.match(n);return a&&Z.includes(a[1])&&(e=t.replace(n,"")),encodeURIComponent(e).replace(r,ie)}const a=e.match(/\/(.*?)$/);return(a?a[1]:e).replace(n,"")}(t.id,t.name),s=a?1:function(e){return Math.min(e.pixelAspectRatio||1,y)}(n),c=se(t.id),u=c,d=J(t.id,r?.hasAnimation,r?.allowAnimatedTransform),l={fileName:o,fileExtension:c,fileType:i,fittingType:e,preferredExtension:u,src:{id:t.id,width:t.width,height:t.height,isCropped:!1,isAnimated:pe(t.id,r?.hasAnimation)},focalPoint:{x:t.focalPoint&&t.focalPoint.x,y:t.focalPoint&&t.focalPoint.y},parts:[],devicePixelRatio:s,quality:0,upscaleMethod:ge(r),progressive:!0,watermark:"",unsharpMask:{},filters:{},transformed:d};return d&&(ye(l,t,n),Re(l,r)),l}function Me(e,t,n){const r={...n},a=Ee("isMobile");switch(e){case S.LEGACY_BG_FIT_AND_TILE:case S.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:case S.LEGACY_BG_FIT_AND_TILE_VERTICAL:case S.LEGACY_BG_NORMAL:const e=a?R:x,n=a?C:A;r.width=Math.min(e,t.width),r.height=Math.min(n,Math.round(r.width/(t.width/t.height))),r.pixelAspectRatio=1}return r}const Oe=W`fit/w_${"width"},h_${"height"}`,Pe=W`fill/w_${"width"},h_${"height"},al_${"alignment"}`,Ge=W`fill/w_${"width"},h_${"height"},fp_${"focalPointX"}_${"focalPointY"}`,Ne=W`crop/x_${"x"},y_${"y"},w_${"width"},h_${"height"}`,Fe=W`crop/w_${"width"},h_${"height"},al_${"alignment"}`,ke=W`fill/w_${"width"},h_${"height"},al_${"alignment"}`,Ue=W`,lg_${"upscaleMethodValue"}`,Be=W`,q_${"quality"}`,He=W`,quality_auto`,De=W`,usm_${"radius"}_${"amount"}_${"threshold"}`,$e=W`,bl`,Ye=W`,wm_${"watermark"}`,Ve={[V.CONTRAST]:W`,con_${"contrast"}`,[V.BRIGHTNESS]:W`,br_${"brightness"}`,[V.SATURATION]:W`,sat_${"saturation"}`,[V.HUE]:W`,hue_${"hue"}`,[V.BLUR]:W`,blur_${"blur"}`},je=W`,enc_auto`,ze=W`,enc_avif`,We=W`,enc_pavif`,qe=W`,pstr`;function Ze(e,t,n,r={},a){if(J(t.id,r?.hasAnimation,r?.allowAnimatedTransform)){if(ee(t.id)||ne(t.id)){const{alignment:i,...o}=n;t.focalPoint={x:void 0,y:void 0},delete t?.crop,a=Se(e,t,o,r)}else a=a||Se(e,t,n,r);return function(e){const t=[];e.parts.forEach((e=>{switch(e.transformType){case M.CROP:t.push(Ne(e));break;case M.LEGACY_CROP:t.push(Fe(e));break;case M.LEGACY_FILL:let n=ke(e);e.upscale&&(n+=Ue(e)),t.push(n);break;case M.FIT:let r=Oe(e);e.upscale&&(r+=Ue(e)),t.push(r);break;case M.FILL:let a=Pe(e);e.upscale&&(a+=Ue(e)),t.push(a);break;case M.FILL_FOCAL:let i=Ge(e);e.upscale&&(i+=Ue(e)),t.push(i)}}));let n=t.join("/");return e.quality&&(n+=Be(e)),e.unsharpMask&&(n+=De(e.unsharpMask)),e.progressive||(n+=$e(e)),e.watermark&&(n+=Ye(e)),e.filters&&(n+=Object.keys(e.filters).map((t=>Ve[t](e.filters))).join("")),e.fileType!==j.GIF&&(e.encoding===z.AVIF?(n+=ze(e),n+=He(e)):e.encoding===z.PAVIF?(n+=We(e),n+=He(e)):e.autoEncode&&(n+=je(e))),e.src?.isAnimated&&e.transformed&&(n+=qe(e)),`${e.src.id}/${L}/${n}/${e.fileName}.${e.preferredExtension}`}(a)}return t.id}const Xe={[O.CENTER]:"50% 50%",[O.TOP_LEFT]:"0% 0%",[O.TOP_RIGHT]:"100% 0%",[O.TOP]:"50% 0%",[O.BOTTOM_LEFT]:"0% 100%",[O.BOTTOM_RIGHT]:"100% 100%",[O.BOTTOM]:"50% 100%",[O.RIGHT]:"100% 50%",[O.LEFT]:"0% 50%"},Ke=Object.entries(Xe).reduce(((e,[t,n])=>(e[n]=t,e)),{}),Je=[S.TILE,S.TILE_HORIZONTAL,S.TILE_VERTICAL,S.LEGACY_BG_FIT_AND_TILE,S.LEGACY_BG_FIT_AND_TILE_HORIZONTAL,S.LEGACY_BG_FIT_AND_TILE_VERTICAL],Qe=[S.LEGACY_ORIGINAL_SIZE,S.ORIGINAL_SIZE,S.LEGACY_BG_NORMAL];function et(e,t,{width:n,height:r}){return e===S.TILE&&t.width>n&&t.height>r}function tt(e,{width:t,height:n}){if(!t||!n){const r=t||Math.min(980,e.width),a=r/e.width;return{width:r,height:n||e.height*a}}return{width:t,height:n}}function nt(e,t,n,r="center"){const a={img:{},container:{}};if(e===S.SCALE_TO_FILL){const e=t.focalPoint&&function(e){const t=`${e.x}% ${e.y}%`;return Ke[t]||""}(t.focalPoint),i=e||r;t.focalPoint&&!e?a.img={objectPosition:rt(t,n,t.focalPoint)}:a.img={objectPosition:Xe[i]}}else[S.LEGACY_ORIGINAL_SIZE,S.ORIGINAL_SIZE].includes(e)?a.img={objectFit:"none",top:"auto",left:"auto",right:"auto",bottom:"auto"}:Je.includes(e)&&(a.container={backgroundSize:`${t.width}px ${t.height}px`});return a}function rt(e,t,n){const{width:r,height:a}=e,{width:i,height:o}=t,{x:s,y:c}=n;if(!i||!o)return`${s}% ${c}%`;const u=Math.max(i/r,o/a),d=r*u,l=a*u,h=Math.max(0,Math.min(d-i,d*(s/100)-i/2)),m=Math.max(0,Math.min(l-o,l*(c/100)-o/2));return`${h&&Math.floor(h/(d-i)*100)}% ${m&&Math.floor(m/(l-o)*100)}%`}const at={width:"100%",height:"100%"};function it(e,t,n,r={}){const{autoEncode:a=!0,isSEOBot:i,shouldLoadHQImage:o,hasAnimation:s,allowAnimatedTransform:c,encoding:u}=r;if(!K(e,t,n))return B;const d=void 0===c||c,l=J(t.id,s,d);if(!l||o)return ot(e,t,n,{...r,autoEncode:a,useSrcset:l});const h={...n,...tt(t,n)},{alignment:m,htmlTag:f}=h,g=et(e,t,h),p=function(e,t,{width:n,height:r},a=!1){if(a)return{width:n,height:r};const i=!Qe.includes(e),o=et(e,t,{width:n,height:r}),s=!o&&Je.includes(e),c=s?t.width:n,u=s?t.height:r,d=i?function(e,t){return e>900?t?.05:.15:e>500?t?.1:.18:e>200?.25:1}(c,Q(t.id)):1;return{width:o?1920:c*d,height:u*d}}(e,t,h,i),_=function(e,t,n){return n?0:Je.includes(t)?1:e>200?2:3}(h.width,e,i),E=function(e,t){const n=Je.includes(e)&&!t;return e===S.SCALE_TO_FILL||n?S.SCALE_TO_FIT:e}(e,g),T=nt(e,t,n,m),{uri:v}=ot(E,t,{...p,alignment:m,htmlTag:f},{autoEncode:a,filters:_?{blur:_}:{},hasAnimation:s,allowAnimatedTransform:d,encoding:u}),{attr:I={},css:b}=ot(e,t,{...h,alignment:m,htmlTag:f},{});return b.img=b.img||{},b.container=b.container||{},Object.assign(b.img,T.img,at),Object.assign(b.container,T.container),{uri:v,css:b,attr:I,transformed:!0}}function ot(e,t,n,r){let a={};if(K(e,t,n)){const i=Me(e,t,n),o=Se(e,t,i,r);a.uri=Ze(e,t,i,r,o),r?.useSrcset&&(a.srcset=function(e,t,n,r,a){const i=n.pixelAspectRatio||1;return{dpr:[`${1===i?a.uri:Ze(e,t,{...n,pixelAspectRatio:1},r)} 1x`,`${2===i?a.uri:Ze(e,t,{...n,pixelAspectRatio:2},r)} 2x`]}}(e,t,i,r,a)),Object.assign(a,function(e,t){let n;return n=t.htmlTag===N.BG?ve:t.htmlTag===N.SVG?Le:we,n(e,t)}(o,i),{transformed:o.transformed})}else a=B;return a}const st="https://static.wixstatic.com/media/";"undefined"!=typeof window&&window.devicePixelRatio;Te();Te();const ct=st,{STATIC_MEDIA_URL:ut}=e,dt=({fittingType:e,src:t,target:n,options:r})=>{const a=it(e,t,n,{...r,autoEncode:!0});return a?.uri&&!/^[a-z]+:/.test(a.uri)&&(a.uri=`${ut}${a.uri}`),a},lt=/^[a-z]+:/,ht=e=>{const{id:t,containerId:n,uri:r,alt:a,name:o="",role:s,width:c,height:u,displayMode:d,devicePixelRatio:l,quality:h,alignType:m,bgEffectName:f="",focalPoint:g,upscaleMethod:p,className:_="",crop:E,imageStyles:T={},targetWidth:v,targetHeight:I,targetScale:b,onLoad:L=(()=>{}),onError:y=(()=>{}),shouldUseLQIP:x,containerWidth:A,containerHeight:R,getPlaceholder:C,isInFirstFold:S,placeholderTransition:M,socialAttrs:O,isSEOBot:P,skipMeasure:G,hasAnimation:N,encoding:F}=e,k=i.useRef(null);let U="";const B="blur"===M,H=i.useRef(null);if(!H.current)if(C||x||S||P){const e={upscaleMethod:p,...h||{},shouldLoadHQImage:S,isSEOBot:P,hasAnimation:N,encoding:F};H.current=(C||dt)({fittingType:d,src:{id:r,width:c,height:u,crop:E,name:o,focalPoint:g},target:{width:A,height:R,alignment:m,htmlTag:"img"},options:e}),U=!H.current.transformed||S||P?"":"true"}else H.current={uri:void 0,css:{img:{}},attr:{img:{},container:{}},transformed:!1};const D=!P&&(C||x)&&!S&&H.current.transformed,$=i.useMemo((()=>JSON.stringify({containerId:n,...n&&{containerId:n},...m&&{alignType:m},...G&&{skipMeasure:!0},displayMode:d,...A&&{targetWidth:A},...R&&{targetHeight:R},...v&&{targetWidth:v},...I&&{targetHeight:I},...b&&{targetScale:b},isLQIP:D,isSEOBot:P,lqipTransition:M,encoding:F,imageData:{width:c,height:u,uri:r,name:o,displayMode:d,hasAnimation:N,...h&&{quality:h},...l&&{devicePixelRatio:l},...g&&{focalPoint:g},...E&&{crop:E},...p&&{upscaleMethod:p}}})),[n,m,G,d,A,R,v,I,b,D,P,M,F,c,u,r,o,N,h,l,g,E,p]),Y=H.current,V=Y?.uri,j=Y?.srcset,z=Y.css?.img,W=`${w} ${_}`;i.useEffect((()=>{const e=k.current;L&&e?.currentSrc&&e?.complete&&L({target:e})}),[]);const q=Y&&!Y?.transformed?`max(${c}px, 100%)`:v?`${v}px`:null;return i.createElement("wow-image",{id:t,class:W,"data-image-info":$,"data-motion-part":`BG_IMG ${n}`,"data-bg-effect-name":f,"data-has-ssr-src":U,"data-animate-blur":!P&&D&&B?"":void 0,style:q?{"--wix-img-max-width":q}:{}},i.createElement("img",{src:V,ref:k,alt:a||"",role:s,style:{...z,...T},onLoad:L,onError:y,width:A||void 0,height:R||void 0,...O,srcSet:S?j?.dpr?.map((e=>lt.test(e)?e:`${ut}${e}`)).join(", "):void 0,fetchpriority:S?"high":void 0,loading:!1===S?"lazy":void 0,suppressHydrationWarning:!0}))};var mt="I5zqsT";var ft=e=>{var t,r;const{id:a,alt:o,role:s,className:c,imageStyles:u={},targetWidth:d,targetHeight:l,onLoad:h,onError:f,containerWidth:g,containerHeight:p,isInFirstFold:_,socialAttrs:E,skipMeasure:T,responsiveImageProps:v,zoomedImageResponsiveOverride:I}=e,b=d||g,w=l||p,L=b+"px",{fallbackSrc:y,srcset:x,css:A}=v||{};return y&&x&&A?i.createElement("img",n()({fetchpriority:_?"high":void 0,loading:!1===_?"lazy":void 0,sizes:L,srcSet:T?null==I?void 0:I.srcset:null==v?void 0:v.srcset,id:a,src:y,alt:o||"",role:s,style:{...u,...T?{...null==I||null==(t=I.css)?void 0:t.img}:{...null==v||null==(r=v.css)?void 0:r.img}},onLoad:h,onError:f,className:m(c,mt),width:b,height:w},E)):i.createElement(ht,e)};var gt=e=>{var t,n,r;const{className:a,customIdPrefix:o,getPlaceholder:s,hasAnimation:c,...u}=e,d=i.useMemo((()=>JSON.stringify({containerId:u.containerId,alignType:u.alignType,fittingType:u.displayMode,hasAnimation:c,imageData:{width:u.width,height:u.height,uri:u.uri,name:u.name,...u.quality&&{quality:u.quality},displayMode:u.displayMode}})),[u,c]),l=i.useRef(null);l.current||(l.current=s?s({fittingType:u.displayMode,src:{id:u.uri,width:u.width,height:u.height,name:u.name},target:{width:u.containerWidth,height:u.containerHeight,alignment:u.alignType,htmlTag:"bg"},options:{hasAnimation:c,allowAnimatedTransform:!1}}):{uri:void 0,css:{img:{}},attr:{img:{},container:{}}});const h=l.current,m=null!=(t=null==h?void 0:h.uri)?t:"",f=null!=(n=null==(r=h.css)?void 0:r.container)?n:{},g=Object.assign(m?{backgroundImage:"url("+m+")"}:{},f);return i.createElement("wix-bg-image",{id:""+(o||"bgImg_")+u.containerId,class:a,style:g,"data-tiled-image-info":d,"data-has-bg-scroll-effect":u.hasBgScrollEffect||"","data-bg-effect-name":u.bgEffectName||"","data-motion-part":"BG_IMG "+u.containerId})};const pt=new RegExp("<%= compId %>","g"),_t=(e,t)=>e.replace(pt,t);var Et=e=>null==e?void 0:e.replace(":hover",""),Tt="bX9O_S",vt="Z_wCwr",It="Jxk_UL",bt="K8MSra",wt="YTb3b4";const Lt={quality:{unsharpMask:{radius:.33,amount:1,threshold:0}},devicePixelRatio:1};var yt=e=>{const{id:t,videoRef:r,videoInfo:a,posterImageInfo:o,muted:s,preload:c,loop:u,alt:d,isVideoEnabled:l,getPlaceholder:h,extraClassName:f=""}=e;a.containerId=Et(a.containerId);const g=i.useMemo((()=>JSON.stringify(a)),[a]),p=i.createElement(i.Fragment,null,o.filterEffectSvgString&&i.createElement("svg",{id:"svg_"+a.containerId,className:wt},i.createElement("defs",{dangerouslySetInnerHTML:{__html:_t(o.filterEffectSvgString,a.containerId)}})),i.createElement(ft,n()({key:a.videoId+"_img",id:o.containerId+"_img",className:m(vt,It,"bgVideoposter",f),imageStyles:{width:"100%",height:"100%"}},o,Lt,{getPlaceholder:h})));return l?i.createElement("wix-video",{id:t,"data-video-info":g,"data-motion-part":"BG_IMG "+a.containerId,class:m(Tt,"bgVideo",f)},i.createElement("video",{key:a.videoId+"_video",ref:r,id:a.containerId+"_video",className:bt,crossOrigin:"anonymous","aria-label":d,playsInline:!0,preload:c,muted:s,loop:u,tabIndex:-1}),p):p},xt="SUz0WK";var At=e=>{const{id:t,containerId:n,pageId:r,children:a,bgEffectName:o="",containerSize:s}=e;return i.createElement("wix-bg-media",{id:t,class:xt,"data-container-id":n,"data-container-size":((null==s?void 0:s.width)||0)+", "+((null==s?void 0:s.height)||0),"data-page-id":r,"data-bg-effect-name":o,"data-motion-part":"BG_MEDIA "+n},a)};const Rt="bgOverlay";var Ct="m4khSP",St="FNxOn5";var Mt=e=>{const{imageOverlay:t}=e;return i.createElement("div",{"data-testid":Rt,className:Ct},t&&i.createElement(gt,n()({customIdPrefix:"bgImgOverlay_",className:St},t)))};const Ot="bgLayers",Pt="colorUnderlay",Gt="mediaPadding",Nt="canvas";var Ft="MW5IWV",kt="N3eg0s",Ut="Kv1aVt",Bt="dLPlxY",Ht="VgO9Yg",Dt="LWbAav",$t="yK6aSC",Yt="K_YxMd",Vt="NGjcJN",jt="mNGsUM",zt="I8xA4L";const Wt="bgImage";var qt=e=>{const{videoRef:t,canvasRef:r,hasBgFullscreenScrollEffect:a,image:o,backgroundImage:s,backgroundMedia:c,video:u,backgroundOverlay:d,shouldPadMedia:l,extraClass:h="",shouldRenderUnderlay:f=!u,reducedMotion:g=!1,getPlaceholder:p,hasCanvasAnimation:_,useWixMediaCanvas:E}=e,{onImageLoad:T}=(e=>{let{onReady:t,image:n}=e;return(0,i.useEffect)((()=>{t&&!n&&t()}),[t,n]),{onImageLoad:e=>{null!=n&&n.onLoad&&n.onLoad(e),t&&t()}}})(e),v=Et(e.containerId),I="img_"+Et(v),b=o&&i.createElement(ft,n()({id:I,className:m(Ut,Bt,jt,Wt),imageStyles:{width:"100%",height:"100%"},getPlaceholder:p},o,{onLoad:T})),w=s&&i.createElement(gt,n()({},s,{containerId:v,className:m(Ut,Bt,jt,Wt),getPlaceholder:p})),L=u&&i.createElement(yt,n()({id:"videoContainer_"+v},u,{extraClassName:$t,reducedMotion:g,videoRef:t,getPlaceholder:p})),y=E&&r||_?i.createElement("wix-media-canvas",{"data-container-id":v,class:_?zt:""},b,w,L,i.createElement("canvas",{id:v+"webglcanvas",className:m(Yt,"webglcanvas"),"aria-label":(null==u?void 0:u.alt)||"",role:"presentation","data-testid":Nt})):i.createElement(i.Fragment,null,b,w,L,r&&i.createElement("canvas",{id:v+"webglcanvas",ref:r,className:m(Yt,"webglcanvas"),"aria-label":(null==u?void 0:u.alt)||"",role:"presentation","data-testid":Nt})),x=c?i.createElement(At,n()({id:"bgMedia_"+v},c),y):i.createElement("div",{id:"bgMedia_"+v,"data-motion-part":"BG_MEDIA "+v,className:Ht},y),A=d&&i.createElement(Mt,d);return i.createElement("div",{id:Ot+"_"+v,"data-hook":Ot,"data-motion-part":"BG_LAYER "+v,className:m(Ft,h,{[kt]:a})},f&&i.createElement("div",{"data-testid":Pt,className:m(Dt,Ut)}),l?i.createElement("div",{"data-testid":Gt,className:Vt},x,A):i.createElement(i.Fragment,null,x,A))};const Zt=v()?i.useLayoutEffect:i.useEffect;var Xt={root:"video-box"},Kt="M7AL1H",Jt="bG1bix",Qt="K0b3At",en="bno0bO",tn="TFzbYK";const nn=13,rn=27,an=["Spacebar"," "],on=["Enter"];function sn(e){return t=>{t.keyCode===e&&(t.preventDefault(),t.stopPropagation(),t.currentTarget.click())}}sn(32),sn(nn),sn(rn);var cn={init:function({gl:e,plane:t,effects:n,dimensions:r,noSource:a}){const i=function(e,t,n,r=!1){const a=r?null:{texture:Tn(e).texture,buffer:null};a&&(e.bindTexture(e.TEXTURE_2D,a.texture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0));const i=function(e,t,n=!1){return t.reduce(((e,t)=>{const{attributes:n=[],uniforms:r=[],textures:a=[],varying:i={}}=t,o=n=>Object.keys(t[n]||{}).forEach((r=>{"constant"===r||"main"===r||"source"===r?e[n][r]+=t[n][r]+"\n":e[n][r]={...e[n][r],...t[n][r]}}));return o("vertex"),o("fragment"),n.forEach((t=>{e.attributes.some((e=>{if(e.name===t.name)return Object.assign(e,t),!0}))||e.attributes.push(t)})),e.attributes.forEach((t=>{if(t.extends){if(!e.attributes.some((e=>{if(e.name===t.extends)return Object.assign(t,e,{name:t.name}),!0})))throw new Error(`Could not find attribute ${t.extends} to extend`)}})),e.uniforms.push(...r),e.textures.push(...a),Object.assign(e.vertex.varying,i),Object.assign(e.fragment.varying,i),e}),function(e,t){const n=t?[]:[{name:"u_source",type:"i",data:[0]}],r=[{name:"a_position",data:new Float32Array(pn({xEnd:2,yEnd:2,factor:1},e)),size:2,type:"FLOAT"}];t||r.push({name:"a_texCoord",data:new Float32Array(pn({xEnd:1,yEnd:1,factor:0},e)),size:2,type:"FLOAT"});return{vertex:{uniform:{},attribute:{},varying:{},constant:"",main:""},fragment:{uniform:{},varying:{},constant:"",main:"",source:""},attributes:r,uniforms:n,textures:[]}}(e,n))}(t,n,r),o=_n(i.vertex,r?un:dn),s=_n(i.fragment,r?ln:hn),{program:c,vertexShader:u,fragmentShader:d,error:l,type:h}=function(e,t,n){const r=En(e,e.VERTEX_SHADER,t),a=En(e,e.FRAGMENT_SHADER,n);if(r.error)return r;if(a.error)return a;return function(e,t,n){const r=e.createProgram();e.attachShader(r,t),e.attachShader(r,n),e.linkProgram(r);const a=e.getProgramParameter(r,e.LINK_STATUS);if(a)return{program:r,vertexShader:t,fragmentShader:n};const i={error:e.getProgramInfoLog(r),type:"program"};return e.deleteProgram(r),i}(e,r,a)}(e,o,s);if(l)throw new Error(`${h} error:: ${l}\n${h===fn.fragment?s:o}`);let m,f;try{m=e.getExtension("OES_vertex_array_object"),f=m.createVertexArrayOES(),m.bindVertexArrayOES(f)}catch(e){}const g=function(e,t,n){return(n||[]).map((n=>{const{location:r,buffer:a}=function(e,t,n,r){const a=e.getAttribLocation(t,n),i=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,i),e.bufferData(e.ARRAY_BUFFER,r,e.STATIC_DRAW),{location:a,buffer:i}}(e,t,n.name,n.data);return{name:n.name,location:r,buffer:a,type:n.type,size:n.size}}))}(e,c,i.attributes);f&&(vn(e,g),m.bindVertexArrayOES(null));const p=function(e,t,n){return(n||[]).map((n=>({location:e.getUniformLocation(t,n.name),size:n.size||n.data.length,type:n.type,data:n.data})))}(e,c,i.uniforms);return{extensions:{vao:m},program:c,vertexShader:u,fragmentShader:d,source:a,attributes:g,uniforms:p,textures:i.textures,vao:f}}(e,t,n,a);return{gl:e,data:i,dimensions:r||{}}},draw:function(e,t={},n,r,a){const{program:i,source:o,attributes:s,uniforms:c,textures:u,extensions:d,vao:l}=r,{xSegments:h=1,ySegments:m=1}=t;n&&o&&o.texture&&(e.bindTexture(e.TEXTURE_2D,o.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n));e.useProgram(i),l?d.vao.bindVertexArrayOES(l):vn(e,s);!function(e,t){(t||[]).forEach((t=>{let{size:n,type:r,location:a,data:i}=t;"i"===r&&(i=new Int32Array(i)),e[`uniform${n}${r}v`](a,i)}))}(e,c);let f=e.TEXTURE0;o&&(e.activeTexture(f),e.bindTexture(e.TEXTURE_2D,o.texture),f=e.TEXTURE1);if(u)for(let t=0;te.deleteBuffer(t.buffer))),c&&s.vao.deleteVertexArrayOES(c);i&&i.texture&&e.deleteTexture(i.texture);e.deleteProgram(n),e.deleteShader(r),e.deleteShader(a)},resize:function(e,t){const n=e.canvas,{width:r,height:a}=t||{};let i,o;r&&a?(i=r,o=a):(i=Math.floor(1*n.clientWidth),o=Math.floor(1*n.clientHeight));n.width===i&&n.height===o||(n.width=i,n.height=o);e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight)},getWebGLContext:function(e){let t;const n={preserveDrawingBuffer:!1,antialias:!1,depth:!1,stencil:!1};if(t=e.getContext("webgl",n),t)gn=!0;else{if(gn)return null;t=e.getContext("experimental-webgl",n)}return t},createTexture:Tn};const un=({uniform:e="",attribute:t="",varying:n="",constant:r="",main:a=""})=>`\nprecision highp float;\n${e}\n${t}\nattribute vec2 a_position;\n${n}\n\nconst vec3 lumcoeff = vec3(0.2125, 0.7154, 0.0721);\n${r}\nvoid main() {\n ${a}\n gl_Position = vec4(a_position.xy, 0.0, 1.0);\n}`,dn=({uniform:e="",attribute:t="",varying:n="",constant:r="",main:a=""})=>`\nprecision highp float;\n${e}\n${t}\nattribute vec2 a_texCoord;\nattribute vec2 a_position;\n${n}\nvarying vec2 v_texCoord;\n\nconst vec3 lumcoeff = vec3(0.2125, 0.7154, 0.0721);\n${r}\nvoid main() {\n v_texCoord = a_texCoord;\n ${a}\n gl_Position = vec4(a_position.xy, 0.0, 1.0);\n}`,ln=({uniform:e="",varying:t="",constant:n="",main:r="",source:a=""})=>`\nprecision highp float;\n${t}\n${e}\n\nconst vec3 lumcoeff = vec3(0.2125, 0.7154, 0.0721);\n${n}\nvoid main() {\n ${a}\n vec3 color = vec3(0.0);\n float alpha = 1.0;\n ${r}\n gl_FragColor = vec4(color, 1.0) * alpha;\n}`,hn=({uniform:e="",varying:t="",constant:n="",main:r="",source:a=""})=>`\nprecision highp float;\n${t}\nvarying vec2 v_texCoord;\n${e}\nuniform sampler2D u_source;\n\nconst vec3 lumcoeff = vec3(0.2125, 0.7154, 0.0721);\n${n}\nvoid main() {\n vec2 sourceCoord = v_texCoord;\n ${a}\n vec4 pixel = texture2D(u_source, sourceCoord);\n vec3 color = pixel.rgb;\n float alpha = pixel.a;\n ${r}\n gl_FragColor = vec4(color, 1.0) * alpha;\n}`,mn={stretch:"CLAMP_TO_EDGE",repeat:"REPEAT",mirror:"MIRRORED_REPEAT"},fn={vertex:"VERTEX",fragment:"FRAGMENT"};let gn=!1;function pn({xEnd:e,yEnd:t,factor:n},r={}){const{xSegments:a=1,ySegments:i=1}=r,o=[];for(let r=0;r(["uniform","attribute","varying"].includes(t)?e[t]=Object.entries(n).reduce(((e,[n,r])=>e+`${t} ${r} ${n};\n`),""):e[t]=n,e)),{}))}function En(e,t,n){const r=e.createShader(t);e.shaderSource(r,n),e.compileShader(r);if(e.getShaderParameter(r,e.COMPILE_STATUS))return r;const a={error:e.getShaderInfoLog(r),type:t===e.VERTEX_SHADER?fn.vertex:fn.fragment};return e.deleteShader(r),a}function Tn(e,{width:t=1,height:n=1,data:r=null,format:a="RGBA",wrap:i="stretch"}={}){const o=e.createTexture();return e.bindTexture(e.TEXTURE_2D,o),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e[In(i.x||i)]),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e[In(i.y||i)]),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),r?e.texImage2D(e.TEXTURE_2D,0,e[a],e[a],e.UNSIGNED_BYTE,r):e.texImage2D(e.TEXTURE_2D,0,e[a],t,n,0,e[a],e.UNSIGNED_BYTE,null),{texture:o,width:t,height:n,format:a}}function vn(e,t){(t||[]).forEach((t=>{const{location:n,buffer:r,size:a,type:i}=t;e.enableVertexAttribArray(n),e.bindBuffer(e.ARRAY_BUFFER,r),e.vertexAttribPointer(n,a,e[i],!1,0,0)}))}function In(e){return mn[e]||mn.stretch}class bn{constructor(e){if(!e||!e.target)throw new Error("A target canvas was not provided");if(bn.preventContextCreation)throw new Error("Context creation is prevented");this._contextCreationError=function(){bn.preventContextCreation=!0,e&&e.onContextCreationError&&e.onContextCreationError.call(this,e)},e.target.addEventListener("webglcontextcreationerror",this._contextCreationError,!1);if(!this.init(e))throw new Error("Could not create context");this._restoreContext=t=>{t&&t.preventDefault(),this.config.target.removeEventListener("webglcontextrestored",this._restoreContext,!0);return!!this.init()&&(this._source&&this.setSource(this._source),delete this._source,e&&e.onContextRestored&&e.onContextRestored.call(this,e),!0)},this._loseContext=t=>{t.preventDefault(),this.gl&&this.gl.isContextLost()&&(this.lostContext=!0,this.config.target.addEventListener("webglcontextrestored",this._restoreContext,!0),this.destroy(!0),e&&e.onContextLost&&e.onContextLost.call(this,e))},this.config.target.addEventListener("webglcontextlost",this._loseContext,!0)}init(e){e=e||this.config;let{target:t,plane:n,effects:r,ticker:a,noSource:i}=e;if(bn.preventContextCreation)return!1;this.lostContext=!1;let o=cn.getWebGLContext(t);if(!o)return!1;if(o.isContextLost()){if(!this.restoreContext())return!1;if(o=cn.getWebGLContext(this.config.target),!o)return!1}const{x:s=1,y:c=1}=n&&n.segments?"object"==typeof n.segments?n.segments:{x:n.segments,y:n.segments}:{};this.plane={xSegments:s,ySegments:c};const{data:u}=cn.init({gl:o,plane:this.plane,effects:r,dimensions:this.dimensions,noSource:i});return this.gl=o,this.data=u,this.config=e,a&&(this.ticker=a,a.add(this)),!0}setSource(e){if(!e)return;if(this.lostContext){if(!this.restoreContext())return}let t,n,r;"[object Object]"===Object.prototype.toString.call(e)?({media:t,width:n,height:r}=e):t=e,n&&r&&(this.dimensions={width:n,height:r}),cn.resize(this.gl,this.dimensions),this._createTextures(),this.media=t}draw(e){if(this.lostContext){if(!this.restoreContext())return}const t=this.config.beforeDraw;t&&!1===t(e)||cn.draw(this.gl,this.plane,this.media,this.data,this.dimensions)}play(e){if(this.config.beforeDraw=e,this.ticker)this.animationFrameId&&this.stop(),this.playing||(this.playing=!0,this.ticker.add(this));else if(!this.animationFrameId){const e=t=>{this.animationFrameId=window.requestAnimationFrame(e),this.draw(t)};this.animationFrameId=window.requestAnimationFrame(e)}}stop(){this.animationFrameId&&(window.cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.playing&&(this.playing=!1,this.ticker.remove(this))}destroy(e){if(this.stop(),this.gl&&this.data&&cn.destroy(this.gl,this.data),e){const e=this.dimensions||{};this._source=this._source||{media:this.media,width:e.width,height:e.height}}else this.config&&(this.config.target.removeEventListener("webglcontextlost",this._loseContext,!0),this.config.target.removeEventListener("webglcontextcreationerror",this._contextCreationError,!1)),this.config=null,this.dimensions=null;this.gl=null,this.data=null,this.media=null}restoreContext(){if(bn.preventContextCreation)return!1;const e=this.config.target,t=this.config.target.cloneNode(!0),n=e.parentNode;return n&&n.replaceChild(t,e),this.config.target=t,e.removeEventListener("webglcontextlost",this._loseContext,!0),e.removeEventListener("webglcontextrestored",this._restoreContext,!0),e.removeEventListener("webglcontextcreationerror",this._contextCreationError,!1),t.addEventListener("webglcontextlost",this._loseContext,!0),t.addEventListener("webglcontextcreationerror",this._contextCreationError,!1),!this.lostContext||this._restoreContext()}_createTextures(){this.data&&this.data.textures.forEach(((e,t)=>{const n=this.data.textures[t];n.texture=cn.createTexture(this.gl,{width:this.dimensions.width,height:this.dimensions.height,format:e.format,data:e.data,wrap:e.wrap}).texture,n.format=e.format,n.update=e.update}))}}var wn={effects:{brightnessContrast:function({brightness:e=1,contrast:t=1}={}){return{fragment:{uniform:{u_brEnabled:"bool",u_ctEnabled:"bool",u_contrast:"float",u_brightness:"float"},constant:"const vec3 half3 = vec3(0.5);",main:"\n if (u_brEnabled) {\n color *= u_brightness;\n }\n\n if (u_ctEnabled) {\n color = (color - half3) * u_contrast + half3;\n }\n\n color = clamp(color, 0.0, 1.0);"},get brightness(){return this.uniforms[2].data[0]},set brightness(e){this.uniforms[2].data[0]=parseFloat(Math.max(0,e))},get contrast(){return this.uniforms[3].data[0]},set contrast(e){this.uniforms[3].data[0]=parseFloat(Math.max(0,e))},get brightnessDisabled(){return!this.uniforms[0].data[0]},set brightnessDisabled(e){this.uniforms[0].data[0]=+!e},get contrastDisabled(){return!this.uniforms[1].data[0]},set contrastDisabled(e){this.uniforms[1].data[0]=+!e},uniforms:[{name:"u_brEnabled",type:"i",data:[1]},{name:"u_ctEnabled",type:"i",data:[1]},{name:"u_brightness",type:"f",data:[e]},{name:"u_contrast",type:"f",data:[t]}]}},hueSaturation:function({hue:e=0,saturation:t=1}={}){return{vertex:{uniform:{u_hue:"float",u_saturation:"float"},constant:"\nconst mat3 lummat = mat3(\n lumcoeff,\n lumcoeff,\n lumcoeff\n);\nconst mat3 cosmat = mat3(\n vec3(0.787, -0.715, -0.072),\n vec3(-0.213, 0.285, -0.072),\n vec3(-0.213, -0.715, 0.928)\n);\nconst mat3 sinmat = mat3(\n vec3(-0.213, -0.715, 0.928),\n vec3(0.143, 0.140, -0.283),\n vec3(-0.787, 0.715, 0.072)\n);\nconst mat3 satmat = mat3(\n vec3(0.787, -0.715, -0.072),\n vec3(-0.213, 0.285, -0.072),\n vec3(-0.213, -0.715, 0.928)\n);",main:"\n float angle = (u_hue / 180.0) * 3.14159265358979323846264;\n v_hueRotation = lummat + cos(angle) * cosmat + sin(angle) * sinmat;\n v_saturation = lummat + satmat * u_saturation;"},fragment:{uniform:{u_hueEnabled:"bool",u_satEnabled:"bool",u_hue:"float",u_saturation:"float"},main:"\n if (u_hueEnabled) {\n color = vec3(\n dot(color, v_hueRotation[0]),\n dot(color, v_hueRotation[1]),\n dot(color, v_hueRotation[2])\n );\n }\n\n if (u_satEnabled) {\n color = vec3(\n dot(color, v_saturation[0]),\n dot(color, v_saturation[1]),\n dot(color, v_saturation[2])\n );\n }\n\n color = clamp(color, 0.0, 1.0);"},varying:{v_hueRotation:"mat3",v_saturation:"mat3"},get hue(){return this.uniforms[2].data[0]},set hue(e){this.uniforms[2].data[0]=parseFloat(e)},get saturation(){return this.uniforms[3].data[0]},set saturation(e){this.uniforms[3].data[0]=parseFloat(Math.max(0,e))},get hueDisabled(){return!this.uniforms[0].data[0]},set hueDisabled(e){this.uniforms[0].data[0]=+!e},get saturationDisabled(){return!this.uniforms[1].data[0]},set saturationDisabled(e){this.uniforms[1].data[0]=+!e},uniforms:[{name:"u_hueEnabled",type:"i",data:[1]},{name:"u_satEnabled",type:"i",data:[1]},{name:"u_hue",type:"f",data:[e]},{name:"u_saturation",type:"f",data:[t]}]}},duotone:function({dark:e=[.7411764706,.0431372549,.568627451,1],light:t=[.9882352941,.7333333333,.05098039216,1]}={}){return{fragment:{uniform:{u_duotoneEnabled:"bool",u_light:"vec4",u_dark:"vec4"},main:"\n if (u_duotoneEnabled) {\n vec3 gray = vec3(dot(lumcoeff, color));\n color = mix(u_dark.rgb, u_light.rgb, gray);\n }"},get light(){return this.uniforms[1].data.slice(0)},set light(e){e.forEach(((e,t)=>{Number.isNaN(e)||(this.uniforms[1].data[t]=e)}))},get dark(){return this.uniforms[2].data.slice(0)},set dark(e){e.forEach(((e,t)=>{Number.isNaN(e)||(this.uniforms[2].data[t]=e)}))},get disabled(){return!this.uniforms[0].data[0]},set disabled(e){this.uniforms[0].data[0]=+!e},uniforms:[{name:"u_duotoneEnabled",type:"i",data:[1]},{name:"u_light",type:"f",data:t},{name:"u_dark",type:"f",data:e}]}},transparentVideo:function(){return{vertex:{uniform:{u_texOffset:"vec2"},main:"v_texAlphaCoord = v_texCoord + u_texOffset;"},fragment:{uniform:{u_tvEnabled:"bool"},main:"\n if (u_tvEnabled) {\n alpha *= dot(lumcoeff, texture2D(u_source, v_texAlphaCoord).rgb);\n\n // transform alpha values from sRGB source to linearRGB - this cleans up the rim from the result\n float linear;\n if (alpha <= 0.04045) {\n linear = alpha / 12.92;\n }\n else {\n linear = pow((alpha + 0.055) / 1.055, 2.4);\n }\n\n alpha = linear;\n\n if (alpha < 0.04) {\n alpha = 0.0;\n }\n else if (alpha > 0.96) {\n alpha = 1.0;\n }\n }"},get disabled(){return!this.uniforms[0].data[0]},set disabled(e){this.uniforms[0].data[0]=+!e},varying:{v_texAlphaCoord:"vec2"},uniforms:[{name:"u_tvEnabled",type:"i",data:[1]},{name:"u_texOffset",type:"f",data:[0,-.5]}],attributes:[{name:"a_texCoord",data:new Float32Array([0,.5,0,1,1,.5,1,.5,0,1,1,1]),size:2,type:"FLOAT"}]}}},Kampos:bn},Ln=r(67740);const{Kampos:yn,effects:xn}=wn;yn.prototype.getRequestFrame=function(){return"requestVideoFrameCallback"in HTMLVideoElement.prototype?e=>this.media.requestVideoFrameCallback(e):window.requestAnimationFrame},yn.prototype.play=function(){if(!this.animationFrameId){const e=this.getRequestFrame(),t=()=>{const n=this.media;this.animationFrameId=e(t),n&&n.readyState>=n.HAVE_CURRENT_DATA&&(!n.paused&&!n.ended||this._needsRedraw)&&(this._needsRedraw=!1,this.draw())};this.animationFrameId=e(t)}};function An(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255,1]:e}const Rn=function(e){void 0===e&&(e={});const t=[xn.transparentVideo()],n="brightness"in e,r="contrast"in e;if(n||r){const a=xn.brightnessContrast();n&&(a.brightness=e.brightness),r&&(a.contrast=e.contrast),t.push(a)}if(e.duotoneDark&&e.duotoneLight){const n=xn.duotone();n.dark=An(e.duotoneDark),n.light=An(e.duotoneLight),t.push(n)}const a="hue"in e,i="saturation"in e;if(a||i){const n=xn.hueSaturation();a&&(n.hue=e.hue),i&&(n.saturation=e.saturation),t.push(n)}return t},Cn=e=>e.readyState>=e.HAVE_CURRENT_DATA,Sn={count:0,set:new Set,add(e){return!!Sn.set.has(e)||Sn.set.size<8&&(Sn.set.add(e),Sn.count=Sn.set.size,!0)},remove(e){Sn.set.delete(e),Sn.count=Sn.set.size}};let Mn=Sn;v()&&(window.__wixWebGLContextManager__?Mn=window.__wixWebGLContextManager__:window.__wixWebGLContextManager__=Sn);const On=!(!v()||window.CSS&&window.CSS.supports("(mask-repeat: no-repeat) or (-webkit-mask-repeat: no-repeat)")),Pn=v()&&Ln.w1(window);var Gn=e=>{var t;const{id:r,className:a,customClassNames:o=[],translations:s,mediaControls:c,containerRootClassName:u,compRef:d,fillLayers:l,reducedMotion:h=!1,isMobileView:f,audioEnabled:g,hasAudio:p,hasAudioRollIn:_,muted:E,autoplay:T,canReplay:I,hasMask:w,animatePoster:L,filterEffect:y,isTransparent:x=!1,alt:A,updateState:R,onPlay:C,onPause:S,onEnded:M,onProgress:O,getPlaceholder:P,shouldShowTransparentVideoPosterOnStop:G}=e,N=i.useRef(null),F=i.useRef(null),k=i.useRef(null),U=i.useRef(null),B=i.useRef(null),H=i.useRef(null),D=i.createRef(),[$,Y]=i.useState(h);i.useEffect((()=>{Y(h)}),[h]);const V=T&&!$,j=$||e.hasClick,z=$||e.canClickPause,W=!$&&e.hasRollIn,q=!$&&e.canRollPause,Z=i.useCallback((e=>{var t,n;if(!R)return;const r="on"!==(null==(t=N.current)?void 0:t.dataset.audio),a=+((null==(n=N.current)?void 0:n.dataset.volume)||1),i=e||{paused:!0,currentTime:0,duration:0,volume:a,muted:r};R({isPlaying:!i.paused,currentTime:i.currentTime||0,duration:i.duration||0,volume:100*a,isMuted:r,shouldPlay:T}),e&&(e.volume=a)}),[T,R]),[X,K]=i.useState(!x||!Pn),[J,Q]=i.useState(!!x&&!X),ee=!(!w||!On),te=i.useMemo((()=>X&&!J),[X,J]),ne=i.useRef(null);x&&X&&!ne.current&&(ne.current=function(e){let{filterEffect:t,playerRef:n,videoRef:r,canvasRef:a,contextRef:i,kampos:o,setCanPlayTV:s}=e,c=!1,u=!1;function d(){r.current&&n.current&&(r.current.removeEventListener("seeked",d),n.current.dataset.showCanvas="",u=!0)}const l={initKampos(){try{o.current=new yn({target:a.current,effects:Rn(t||{}),onContextLost:()=>{const e=o.current._source&&o.current._source.media;e&&(e.ended||e.paused)&&(o.current._needsRedraw=!0),this.stopKampos(),c&&this.playKampos()}}),o.current.hasContext=!0}catch(e){return Mn.remove(i),s(!1),void(u&&l.showPoster())}if(!r.current)return;const e=()=>{var t;r.current&&(o.current.setSource({width:(t=r.current)&&t.videoWidth||0,height:t&&t.videoHeight/2||0,media:t}),l.playKampos(),r.current.removeEventListener("loadeddata",e,!1))};Cn(r.current)?e():r.current.addEventListener("loadeddata",e,!1)},playKampos(){if(!n.current||!a.current)return;let e;e=o.current?o.current.hasContext||Mn.add(i):!yn.preventContextCreation&&Mn.add(i),e?o.current&&o.current.config?(o.current.lostContext&&o.current.restoreContext(),o.current.hasContext=!0,o.current.play(),!u&&o.current.media&&Cn(o.current.media)&&"playing"in n.current.dataset&&l.removePoster()):l.initKampos():u&&l.showPoster()},stopKampos(){Mn.remove(i),o.current.hasContext=!1,o.current.stop()},killKampos(){var e;o.current&&(l.stopKampos(),o.current.destroy()),null==(e=r.current)||e.removeEventListener("seeked",d)},removePoster(){const e=r.current,t=n.current;!u&&t&&e&&o.current&&((e.paused||e.ended||o.current._needsRedraw)&&(o.current._needsRedraw=!1,o.current.draw()),e.addEventListener("seeked",d),e.currentTime=0)},showPoster(){n.current&&r.current&&(delete n.current.dataset.showCanvas,u=!1)},onViewEnter(){c=!0,l.playKampos()},onViewLeave(){c=!1,o.current&&o.current.hasContext&&l.stopKampos()}};return l}({filterEffect:y,playerRef:N,videoRef:F,canvasRef:k,contextRef:D,kampos:H,setCanPlayTV:K}));const re=i.useRef(null);function ae(){const e={play:[],pause:[],ended:[],timeupdate:[]};if(R){const t=e=>R({isPlaying:!e.target.paused,duration:e.target.duration}),n=e=>R({currentTime:e.target.currentTime});e.loadeddata=[e=>{Z(e.target)}],e.play.push(t),e.pause.push(t),e.ended.push(t),e.timeupdate.push(n)}return x&&ne.current&&e.play.push(ne.current.removePoster),C&&e.play.push((()=>C({type:"onPlay"}))),S&&e.pause.push((()=>S({type:"onPause"}))),M&&e.ended.push((()=>M({type:"onEnded"}))),O&&e.timeupdate.push((()=>O({type:"onProgress"}))),e}let ie=!1;re.current||(re.current=ae(),ie=!0),i.useEffect((()=>{ie||(re.current=ae())}),[C,S,M,O,x,Z,R]);const oe=g&&p,se=i.useCallback((()=>{var e;G&&(null==(e=ne.current)||e.showPoster())}),[G]),{videoAPI:ce,onClick:ue,onMouseEnter:de,onMouseLeave:le,onMouseMove:he,onKeyDown:me,mediaHandler:fe,setAudioContext:ge,MEDIA_EVENTS:pe}=i.useMemo((()=>function(e){var t;let n,{playerRef:r,videoRef:a,playButtonRef:i,audioRef:o,isMobileView:s,autoplay:c,hasAudio:u,hasClick:d,hasRollIn:l,hasAudioRollIn:h,canClickPause:m,canRollPause:f,canReplay:g,extraMediaHandlers:p={},updateState:_=(()=>{}),onStop:E}=e,T=+((null==(t=r.current)?void 0:t.dataset.volume)||1);function I(e){if(!r.current||!a.current)return;const t="boolean"==typeof e?e:!a.current.muted;A=!t,t?b.mute():b.unmute()}const b={setVolume(e){T=e,a.current&&(a.current.volume=T),r.current&&(r.current.dataset.volume=T.toString())},play(e){r.current&&a.current&&(e&&(r.current.dataset.playing="",_({shouldPlay:!0})),i.current&&i.current.setAttribute("aria-pressed","true"),a.current.play(),R=!0)},pause(){r.current&&a.current&&(delete r.current.dataset.playing,i.current&&i.current.setAttribute("aria-pressed","false"),a.current.pause(),_({shouldPlay:!1}))},load:()=>{var e;return null==(e=a.current)?void 0:e.load()},stop(){r.current&&a.current&&(delete r.current.dataset.playing,i.current&&i.current.setAttribute("aria-pressed","false"),E&&E(),a.current.pause(),a.current.currentTime=0,_({shouldPlay:!1}))},togglePlay(){a.current&&(a.current.paused?b.play(!0):b.pause())},mute(){r.current&&a.current&&(a.current.muted=!0,r.current.dataset.audio="off",o.current&&o.current.setAttribute("aria-pressed","true"),_({isMuted:!0}))},unmute(e){if(!r.current||!a.current)return;const t=r.current,n=a.current;e?G(n):n.muted=!1,t.dataset.audio="on",o.current&&o.current.setAttribute("aria-pressed","false"),_({isMuted:!1})}};let w,L,y,x=!1,A=u,R=c||!d;const C={handleEvent(e){const t=e.type,n=r.current;"loadeddata"===t&&n&&(n.dataset.canPlay=""),"ended"===t&&n&&(g||(x=!0,n.dataset.stop=""),delete n.dataset.playing),p[t]&&p[t].length&&p[t].forEach((t=>t(e)))}},S=e=>{n&&n.resume();const t=r.current,i=a.current,s=o.current;t&&i&&!x&&(u&&s&&(O(t),s.contains(e.target))?I():i.paused?b.play(!0):m&&b.pause())},M=e=>{n&&n.resume();const t=r.current,i=a.current,s=o.current;if(!t||!i||x)return;const h=!c&&!t.dataset.touched,g="on"===t.dataset.touched;u&&(O(t),s&&s.contains(e.target))?I():((h||g)&&(i.paused?b.play(!0):(m||f)&&b.pause()),(d||l)&&(clearTimeout(y),t.dataset.touched="on",y=window.setTimeout((()=>t.dataset.touched="off"),1400)))},O=e=>{e.dataset.showAudio="",clearTimeout(L),L=window.setTimeout((()=>{delete e.dataset.showAudio}),2e3)},P=e=>{clearTimeout(L),delete e.dataset.showAudio},G=e=>{e.volume=0,e.muted=!1;let t=0;window.clearInterval(w),w=window.setInterval((()=>{t+=.2,t>=T?(e.volume=T,window.clearInterval(w)):e.volume=t}),200)},N=e=>{e.volume=T;let t=1;window.clearInterval(w),w=window.setInterval((()=>{t-=.2,t<=0?(e.volume=0,e.muted=!0,window.clearInterval(w)):e.volume=t}),200)},F=v()&&"ontouchend"in window&&s,k=s?void 0:e=>{if(![...an,...on].includes(e.key))return;e.preventDefault();const t=r.current,n=a.current,i=o.current;t&&n&&!x&&(i&&i.contains(e.target)?I():b.togglePlay())};let U;F?(u||d||l)&&(U=M):(u||d)&&(U=S);const B=!F&&(u||l||d)?()=>{const e=r.current,t=a.current;if(e&&t&&!x&&(l?b.play():d&&(e.dataset.rollIn=""),u&&R)){O(e);const r=!n||["running","interrupted"].includes(n.state);A&&r&&(h||l)&&t.muted&&b.unmute(!0)}}:void 0;return{videoAPI:b,onClick:U,onMouseEnter:B,onMouseLeave:!F&&(u||f||d)?()=>{const e=r.current,t=a.current;e&&t&&(f?t.pause():d&&delete e.dataset.rollIn,u&&(P(e),h&&!t.muted&&N(t)))}:void 0,onMouseMove:!F&&u?()=>{const e=r.current;e&&u&&R&&O(e)}:void 0,onKeyDown:k,mediaHandler:C,setAudioContext:function(){const e=window.AudioContext||window.webkitAudioContext;v()&&e&&a.current&&(n=new e)},MEDIA_EVENTS:new Set([...Object.keys(p),"loadeddata","ended"])}}({playerRef:N,videoRef:F,playButtonRef:U,audioRef:B,isMobileView:f,autoplay:V,hasAudio:oe,hasClick:j,hasRollIn:W,hasAudioRollIn:_,canClickPause:z,canRollPause:q,canReplay:I,extraMediaHandlers:re.current||{},updateState:R,onStop:se})),[f,V,j,W,_,z,q,I,R,oe,se]);return Zt((()=>{var e;if(te&&N.current&&(B.current||(B.current=N.current.querySelector("[data-audio-mute]"))),Q(ee),null!=l&&null!=(e=l.video)&&null!=(e=e.videoInfo)&&e.isVideoDataExists||!N.current||delete N.current.dataset.showCanvas,!(ee||x&&!X)&&(x||oe||j)){var t,n;const e=function(e){let{playerRef:t,videoRef:n,onViewEnter:r,onViewLeave:a}=e;if(!v())return;const i={visible:!window.document.hidden,intersecting:!1},o=()=>{n.current&&t.current&&"playing"in t.current.dataset&&(i.visible=!window.document.hidden,i.visible&&i.intersecting?n.current.play():n.current.pause())};window.document.addEventListener("visibilitychange",o);let s=null;return t.current&&"function"==typeof window.IntersectionObserver&&(s=new window.IntersectionObserver((e=>{const o=t.current,s=n.current;s&&o&&e.forEach((e=>{s&&e.target===o&&(i.intersecting=e.isIntersecting,i.visible&&i.intersecting?(null==r||r(),"playing"in o.dataset&&s.src&&s.play()):(null==a||a(),s.pause()))}))})),s.observe(t.current)),function(){window.document.removeEventListener("visibilitychange",o),s&&(s.disconnect(),s=null)}}({playerRef:N,videoRef:F,onViewEnter:null==(t=ne.current)?void 0:t.onViewEnter,onViewLeave:null==(n=ne.current)?void 0:n.onViewLeave});return function(){var t;null==e||e(),null==(t=ne.current)||t.killKampos()}}}),[x,X,ne.current,oe]),i.useEffect((()=>{if(x&&!X)return;const e=F.current,t=new Set(Array.from(pe).concat(Object.keys(re.current||{}).filter((e=>re.current&&re.current[e]&&re.current[e].length))));return t.forEach((t=>{e&&!ee&&("loadeddata"===t&&e.readyState>=e.HAVE_CURRENT_DATA?(fe.handleEvent({type:t}),window.setTimeout((()=>Z(F.current)),200)):e.addEventListener(t,fe))})),ge&&!ee&&ge(),()=>{t.forEach((t=>{e&&e.removeEventListener(t,fe)}))}}),[x,X,ge,fe,pe,ee,R,Z,null==l||null==(t=l.video)||null==(t=t.videoInfo)?void 0:t.isVideoDataExists]),i.useImperativeHandle(d,(()=>ce)),i.useEffect((()=>{const e=N.current;!V&&e&&e.removeAttribute("data-playing")}),[V]),i.createElement("div",n()({id:r},(e=>Object.entries(e).reduce(((e,[t,n])=>(t.includes("data-")&&(e[t]=n),e)),{}))(e),{ref:N,className:m(Kt,u,a,b(Xt.root,...o)),onClick:te?ue:void 0,onMouseEnter:te?de:void 0,onMouseLeave:te?le:void 0,onMouseMove:te?he:void 0,onKeyDown:te?me:void 0,"data-audio":E?"off":"on","data-has-play":te&&(j||W)?"":void 0,"data-no-audio":te&&oe?void 0:"","data-playing":te&&V?"":void 0,"data-stop":te?void 0:"","data-animate-poster":x?L:void 0,"data-has-alpha":x?"true":void 0}),i.createElement("div",{ref:U,className:m(Qt,{[tn]:x}),tabIndex:0,role:"button","aria-label":A+" "+s.ariaLabel,"aria-pressed":V?"true":"false"},i.createElement(qt,n()({},l,{getPlaceholder:P,reducedMotion:$,videoRef:F,canvasRef:x?k:void 0,extraClass:en}))),te?c:null)};const Nn=(e,t)=>{const r=i.createElement(T,n()({},e.responsiveContainerProps,{extraRootClass:Jt}),e.children);return i.createElement(Gn,n()({},e,{compRef:t,mediaControls:r}))};const Fn=e=>e.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase()));var kn;const Un={MediaPlayer_videoBoxResponsive:{component:i.forwardRef(Nn),controller:(kn=e=>{let{stateValues:t,mapperProps:n}=e;const{reducedMotion:r,experiments:a={}}=t,i=((e,t)=>!0===e[t]||"true"===e[t]||"new"===e[t])(a,"specs.thunderbolt.isClassNameToRootEnabled");return{...n,reducedMotion:r,isClassNameToRootEnabled:i}},{useComponentProps:(e,t,n)=>{const r=(e=>({...e,updateStyles:t=>{const n=Object.entries(t).reduce(((e,t)=>{let[n,r]=t;return{...e,[(a=n,a.startsWith("--")?n:Fn(n))]:void 0===r?null:r};var a}),{});e.updateStyles(n)}}))(n);return kn({mapperProps:e,stateValues:t,controllerUtils:r})}})}}}(),a}()})); //# sourceMappingURL=https://static.parastorage.com/services/editor-elements-library/dist/thunderbolt/rb_wixui.thunderbolt[MediaPlayer_videoBoxResponsive].fb1f4d04.bundle.min.js.map